Crate bessie[−][src]
Expand description
Bessie is an authenticated, chunked cipher based on BLAKE3. It’s still in the design stages, and it’s not suitable for production use.
Examples
Encrypt a message.
let key = bessie::generate_key();
let ciphertext: Vec<u8> = bessie::encrypt(&key, b"hello world");
Decrypt that message.
let plaintext: Vec<u8> = bessie::decrypt(&key, &ciphertext)?;
assert_eq!(b"hello world", &plaintext[..]);
Structs
An incremental decrypter supporting std::io::Read
and std::io::Seek
.
An incremental encrypter supporting std::io::Write
.
An opaque decryption error.
Constants
Functions
Compute the length of a ciphertext, given the length of a plaintext.
Decrypt a message and return the plaintext as Result
of Vec<u8>
.
Decrypt a message, write the plaintext to an existing slice, and return a Result
.
Encrypt a message and return the ciphertext as a Vec<u8>
.
Encrypt a message and write the ciphertext to an existing slice.
Create a new 32-byte key from a cryptographically secure random number generator.
Compute the length of a plaintext, given the length of a ciphertext.